package com.yunxin.core.infra.persistence.mapper.merchant;

import com.baomidou.dynamic.datasource.annotation.DS;
import com.yunxin.core.infra.persistence.entity.merchant.MerchantUserAccountDO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author zero°
 * @since 2023-06-02
 */
public interface MerchantUserAccountMapper {
    /**
     *
     * @mbg.generated
     */
    int deleteByPrimaryKey(Long id);

    /**
     *
     * @mbg.generated
     */
    int insert(MerchantUserAccountDO row);

    /**
     *
     * @mbg.generated
     */
    int insertSelective(MerchantUserAccountDO row);

    /**
     *
     * @mbg.generated
     */
    MerchantUserAccountDO selectByPrimaryKey(Long id);

    /**
     *
     * @mbg.generated
     */
    int updateByPrimaryKeySelective(MerchantUserAccountDO row);

    /**
     *
     * @mbg.generated
     */
    int updateByPrimaryKey(MerchantUserAccountDO row);

    Integer countNotTakeOrders(@Param("merchantId") Long merchantId, @Param("serviceIds") List<Long> serviceIds);

    @DS("admin")
    List<Long> selectMerchantUidByRoles(@Param("merchantId") Long merchantId, @Param("roleIds") List<Long> roleIds);

}